home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
macros
/
latex209
/
contrib
/
pslatex
/
fonts
/
makefonts.ps
< prev
next >
Wrap
Text File
|
1992-05-21
|
3KB
|
84 lines
%!
% PostScript code to generate derived fonts for PS-LaTeX
%
% Create a transformed font
% params: symbol for name of new font,
% symbol for name of original font,
% font transformation matrix
% proc to execute on font (the transformed font dict is on the
% top of the stack when this proc is called)
/TransformFont {
30 dict begin % for temporary storage
/Proc exch def % the proc to exec
/TransformMatrix exch def % transform matrix
/BaseName exch def % existing font
/NewName exch def % new name
% find old font, apply transfrom
/BaseFontDict BaseName findfont TransformMatrix makefont def
% make a dictionary for the new font
/NewFont BaseFontDict maxlength dict def
% copy entries into the new dictionary (see Cookbook for expln.)
BaseFontDict
{ exch dup /FID ne
{ dup /Encoding eq
{ exch dup length array copy
NewFont 3 1 roll put }
{ exch NewFont 3 1 roll put }
ifelse }
{ pop pop }
ifelse
} forall
NewFont /FontName NewName put
% call procedure
NewFont Proc
% store new font in fontdict
NewName NewFont definefont
pop
end
} def
% Create an Oblique font
% params: new name for font
% old font
% angle of obliqueness
/ObliqueFont {
20 dict begin
/Angle exch def
[1 0 Angle sin Angle cos div 1 0 0] % transform for obliqueness
{pop}
TransformFont
end
} def
% Create a condensed font with different strokewidth
% params: new font name
% old font name
% factor to condense by (e.g., 0.8)
% factor to thicken lines by (e.g., 1.5)
/CondensedFont {
20 dict begin
/LineThickening exch def
/WidthNarrowing exch def
[WidthNarrowing 0 0 1 0 0] % transform matrix
{dup /StrokeWidth get LineThickening mul /StrokeWidth exch put}
TransformFont
end
} def
/Times-Oblique /Times-Roman 15 ObliqueFont
/Times-BoldOblique /Times-Bold 15 ObliqueFont
%/Times-ItalicUnslanted /Times-Italic -15.15 ObliqueFont
/Symbol-Oblique /Symbol 15 ObliqueFont
/Courier-Narrow /Courier 0.85 1.3 CondensedFont
% Can use these on a LaserWriter Plus
/makeLWPlusFonts {
/Bookman-LightOblique /Bookman-Light 10 ObliqueFont
/NewCenturySchlbk-Oblique /NewCenturySchlbk-Roman 10 ObliqueFont
/Palatino-Oblique /Palatino-Roman 10 ObliqueFont
/Palatino-BoldOblique /Palatino-Bold 10 ObliqueFont
} def